from django.shortcuts import render

# 把settings.py文件中的DEBUG设置为True，ALLOWED_HOSTS = ['*']，并配置URL定义： 如handler404..
# 再进行测试
# 自定制错误处理页面，添加标题(title)
def permission_denied(request, exception):
    """HTTP 403"""
    return render(request, '403.html')


def page_not_found(request, exception):
    """HTTP 404"""
    return render(request, '404.html')


def internal_server_error(request):
    """HTTP 500"""
    return render(request, '500.html')
